package demo;

/**
 * 需求:定义一个方法求两个数的和
 * 需求:定义一个方法求三个数的和
 */
public class VariableParameterDemo1 {
    public static void main(String[] args) {
        int a = 10;
        int b = 20;
        int c = 30;

        System.out.println(getSum(a, b));
        System.out.println(getSum(a, b, c));
    }

    public static int getSum(int a, int b) {
        return a + b;
    }

    public static int getSum(int a, int b, int c) {
        return a + b + c;
    }
}
